package com.yanqu.road.entity.log.kowloon;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.log.ServerBaseLog;

import java.sql.Types;
import java.util.Date;

@FieldTypeAnnotation(tableName = "t_l_ck_kowloon_battle", desc = "九龙城寨-战斗日志", autoSave = true, uploadCk = true)
public class LogKowloonBattle extends ServerBaseLog {

    @FieldTypeAnnotation(desc = "用户ID", isIndex = true)
    private long userId;

    @FieldTypeAnnotation(desc = "关卡id")
    private int chapterId;

    @FieldTypeAnnotation(desc = "波次")
    private int sectionId;

    @FieldTypeAnnotation(desc = "地痞map", sqlType = Types.LONGNVARCHAR)
    private String enemyMap;

    @FieldTypeAnnotation(desc = "好汉map", sqlType = Types.LONGNVARCHAR)
    private String heroMap;

    @FieldTypeAnnotation(desc = "血量上限")
    private long maxHp;

    @FieldTypeAnnotation(desc = "当前血量")
    private long curHp;

    @FieldTypeAnnotation(desc = "技能map", sqlType = Types.LONGNVARCHAR)
    private String skillMap;

    @FieldTypeAnnotation(desc = "士气等级")
    private int moraleLevel;

    @FieldTypeAnnotation(desc = "时间")
    private Date addTime;

    public LogKowloonBattle(long userId, int chapterId, int sectionId, String enemyMap, String heroMap, long maxHp, long curHp, String skillMap, int moraleLevel) {
        this.userId = userId;
        this.chapterId = chapterId;
        this.sectionId = sectionId;
        this.enemyMap = enemyMap;
        this.heroMap = heroMap;
        this.maxHp = maxHp;
        this.curHp = curHp;
        this.skillMap = skillMap;
        this.moraleLevel = moraleLevel;
        this.addTime = new Date();
    }

    @Override
    public long getUserId() {
        return userId;
    }
}
